package com.xxx.system.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;
@Data
public class Menu {
    private Long id;
    private String name;
    private String component;
    private String url;
    private String icon;
    private Integer index;
    private Long parentId;
    //告诉json框架  如果这个children是空数据  这个属性就不转成json字符串
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Menu> children = new ArrayList<>();

}
